// 导入cookie
import Cookies from 'js-cookie'

const TokenKey = 'hrsass-token'
// 获取cookie
export function getToken () {
  return Cookies.get(TokenKey)
}
// 保存cookie
export function setToken (token) {
  return Cookies.set(TokenKey, token)
}
// 删除cookie
export function removeToken () {
  return Cookies.remove(TokenKey)
}
// 设置一个token时间的key
const TokenTimeKey = 'mytime'
// 获取保存token时间戳
export function getTimeStamp () {
  return Cookies.get(TokenTimeKey)
}
// 设置token保存的时间戳
export function setTimeStamp () {
  const time = Date.now()
  return Cookies.set(TokenTimeKey, time)
}
// 清除token的保存时间
export function removeTimeStamp () {
  return Cookies.remove(TokenTimeKey)
}
// 814700591